home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
fweb
/
fweb-1.40
/
manual
/
f_to_web.f
< prev
next >
Wrap
Text File
|
1993-10-29
|
2KB
|
78 lines
C FTANGLE v1.30, created with UNIX on "Tuesday, May 11, 1993 at 10:55."
C COMMAND LINE: "ftangle ./f_to_web -zdemos.sty -=f_to_web.f"
C RUN TIME: "Thursday, June 10, 1993 at 12:39."
C WEB FILE: "./f_to_web.web"
C CHANGE FILE: (none)
C* 1: *
*line 35 "./f_to_web.web"
program main
C* 2: *
*line 54 "./f_to_web.web"
integer i
real x
common/test/x,i
C* :2 *
*line 37 "./f_to_web.web"
C* Initialize values. Long comments should be done in standard C style and m
Cay be continued across lines.
x=-3.14159e-11
i=1
call see
C Print results. (Short comments can be done like this.)
end
C* :1 *
C* 3: *
*line 66 "./f_to_web.web"
subroutine see
C* 2: *
*line 54 "./f_to_web.web"
integer i
real x
common/test/x,i
C* :2 *
*line 69 "./f_to_web.web"
C You can abbreviate the name if it has already appeared in full.
write(6,90000)x,i
90000 format(' x = ',1pe10.2,', i = ',i2)
return
end
C* :3 *
C* 4: *
*line 82 "./f_to_web.web"
C* 4: *
*line 83 "./f_to_web.web"
integer function f(a,b,n)
integer n
real a(0:n-1),b(0:n-1)
integer k
C* You can (and should) use a |do| loop for the following, but the |for|
Cconstruction is more flexible in general, so we use it to demonstrate.
CONTINUE
C --- "for(k=0; k<n; k++)" ---
k=0
90001 IF(k.LT.n)THEN
a(k)=k
b(k)=k**2
C* In Ratfor and Fortran, you can use pretty
Calternatives for archaic Fortran constructions such as~\.{.lt.} or~\.{**}.
C --- Reinitialization of "for(k=0; k<n; k++)" ---
k=k+1
GOTO 90001
ENDIF
CONTINUE
C --- "return n" ---
f=n
RETURN
C/ It's easy to return values from functions.
END
C* :4 *